package com.yanmaohu.yulia.bean;

import com.yanmaohu.yulia.statement.SqlSchemaDefinitionStatement;

/**
 * @author Bright Lee
 */
public final class UserDefinedTypeDefinition implements SchemaElement, SqlSchemaDefinitionStatement {

    private int beginIndex;
    private int endIndex;
    private UserDefinedTypeBody userDefinedTypeBody;

    public UserDefinedTypeDefinition(int beginIndex, UserDefinedTypeBody userDefinedTypeBody) {
        this.beginIndex = beginIndex;
        this.endIndex = userDefinedTypeBody.getEndIndex();
        this.userDefinedTypeBody = userDefinedTypeBody;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public UserDefinedTypeBody getUserDefinedTypeBody() {
        return userDefinedTypeBody;
    }

}
